Skip to content

Conversation

@winrid
Copy link
Contributor

@winrid winrid commented Nov 19, 2025

Normally I prefer more targeted PRs, but the Nim generator needed a lot of fixes to be usable for me, so here they are :)

  1. Fixes trailing underscores in identifiers (I guess not allowed w/ Nim)
  2. Fixes top-level enum generation (were empty objects instead of enums)
  3. Fixes enum serialization for numeric values (only worked for strings previously)
  4. Fixes import/filename consistency
  5. Fixes object keyword conflicts (was using reserved keywords as types)
  6. Adds helper types for AnyType and Object
  7. Adds support for HTTP DELETE with request body (existing http lib doesn't seem to support this w/ same syntax as other method types)
  8. Fixes record type references - underscored names in generic containers
  9. support oneOf/anyOf via nim object variants
  10. optional field support
  11. Don't include empty optional parameters in URLs
  12. integer enums support

@wing328

@winrid winrid changed the title Nim Generator Fixes [nim] Nim Generator Fixes Nov 19, 2025
@wing328
Copy link
Member

wing328 commented Nov 19, 2025

@winrid thanks for the PR

cc @hokamoto (author of the Nim client generator)

@hokamoto
Copy link
Contributor

Thank you so much for your fix @winrid !

@wing328
Copy link
Member

wing328 commented Nov 19, 2025

I'll run some tests later this week

If no issue found, I'll merge it.

@wing328 wing328 added this to the 7.18.0 milestone Nov 19, 2025
…URLs, support oneOf/anyOf via nim object variants, optional field support
@winrid
Copy link
Contributor Author

winrid commented Nov 21, 2025

added:

  • support oneOf/anyOf via nim object variants
  • optional field support
  • Don't include empty optional parameters in URLs

@winrid
Copy link
Contributor Author

winrid commented Nov 21, 2025

I think there is a bug with fields like _id - fixing

@winrid
Copy link
Contributor Author

winrid commented Nov 21, 2025

Okay, now it's ready for review :) That got kind of wild to support nim's type system, but it works, and cleans up the generated models some. Enums now also support integer ordinals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants